<?
 session_start();
 if (@$_SESSION['client']==0) { header('Location: /login.php');};

 @$id = $_GET["problem"];
 if (@$id == null) {$id = "A";}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>openOli | Submit</title>
<link rel="icon" href="img/favicon.png" type="image/png" />
<link href="css/yahoo_reset.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="facebox/facebox.css" rel="stylesheet" type="text/css" />
<link href="css/submit.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="facebox/facebox.js"></script>
<script type="text/javascript">
    
  $(document).ready(function(){
        $(".pInfo").mouseover(function() { this.id="pInfoOn"})
        $(".pInfo").mouseout(function() { this.id=""})
        $('a[rel*=facebox]').facebox();
        setInterval ( "updateSide()", 2000 );
        setInterval(function(){$("#timebox").load("time.php");}, 30000);
        })
</script>
</head>

<body>
  <!-- openOli::Contest | Turan Rustamli -->
  <div id="page">
  
    <div id="hdtext">
	   <div id="hdt_l">open source web based judge for holding olympiads in informatics</div>
	   <div id="hdt_r">English &nbsp; <img src="img/ico_mail.gif" alt="openOli" border="0"> &nbsp; <img src="img/ico_home.gif" alt="openOli" border="0"></div>
	</div>
    
	<div id="header">
	   <div id="logo"><a href="dashboard.php"><img src="img/logo.jpg" alt="openOli" border="0"></a></div>
	   <div id="topmenu">
	        <a class="foxbtn" href="dashboard.php"><span>Dashboard</span></a>
	        <a class="foxbtn" href="problems.php"><span>Problems</span></a>
            <a class="foxbtn_x" href="submit.php"><span>Submit</span></a>
            <a class="foxbtn" href="test.php"><span>Test</span></a>
            <a class="foxbtn" href="archive.php"><span>History</span></a>
            <a class="foxbtn" href="help.php"><span>Help</span></a>
            <a class="foxbtn" href="logout.php"><span>Log out</span></a>
	   </div> 	    
	   <div id="toolbox">		  
		  <div id="timebox">
	          <? include('time.php'); ?>
		  </div>
		</div> 	    
	</div>
	
	<div id="content">
	   <table width="100%" border="0" cellspacing="2">
		<tr>
			<td>
			   <p class="p_title">Submit a sulution</p>
               <div style="margin-left: 10px;">
                  Submiting a solution means uploading a source file of program,
                  which gets problem's input data and returns valid result.
			   </div>  
			   <br/>
               <form action="judge.php" method="post" enctype="multipart/form-data">
               <div class="subsection">
                 <h2><b>1.</b> Select Problem:</h2>
                 <select id="problem" name="problem" class="selectable">
                   <option <? if ($id=="A") { ?>selected="selected"<? }; ?> value="A">Problem A</option>
                   <option <? if ($id=="B") { ?>selected="selected"<? }; ?> value="B">Problem B</option>
                   <option <? if ($id=="C") { ?>selected="selected"<? }; ?> value="C">Problem C</option>
                   <option <? if ($id=="D") { ?>selected="selected"<? }; ?> value="D">Problem D</option>
                   <option <? if ($id=="E") { ?>selected="selected"<? }; ?> value="E">Problem E</option>
                 </select>
               </div>

			   <div class="subsection">
                 <h2><b>2.</b> Select Language:</h2>
                 <select id="lang" name="lang" class="selectable">
                   <option value="pas">Pascal</option>
                   <option value="c">C</option>
                   <option value="cpp">C++</option>
                   <option value="java">Java</option>
                 </select>
               </div>

			   <div class="subsection">
                 <h2><b>3.</b>Upload Solution:</h2>
                 <input type="file" id="solution" name="solution" class="selectable" />
               </div>
               <br/>
               <input type="submit" value="Submit solution" class="selectable" />
               </form>
               	
			</td>
			<td id="sidebar">
			  <div id="msgs"><? include("messages.php"); ?></div>
			 </td>
		</tr>
       </table>
	</div>	
	
	<div id="bottom"><span id="b_left">&copy; Turan Rustamli - You may use openOli under the terms of the MIT License.</div></div>	
	<br />
  </div>
</body>
</html>
